home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 04 - 1988 / 04.01 Jan 88 / mpw source stuff / for Tools folder / MixMake ver.2 < prev    next >
Encoding:
Text File  |  1987-09-14  |  2.0 KB  |  83 lines  |  [TEXT/MPS ]

  1. ###        MixMake version 2.  
  2. ####    Uses Sequencer application and Consulair Exec
  3.  
  4. ### Script file to build programs with
  5. ### MacC or TML systems
  6. ###        W.G. Powell    1987    for MacTutor
  7.  
  8. ### Initialize variables
  9. #    Exec and MacC input and scratch files
  10. Set Efile "MixMake.Job"
  11. Set Cfile "MacC.Files"
  12. Set Lfile "CLink.Tmp"
  13. Set    Tfile "TLink.Tmp"
  14. Set Seqfile "Sequencer.R"
  15. Delete -i "{Efile}" "{Cfile}" "{Lfile}" "{Tfile}"
  16. Echo "#include ∂"Types.r∂"">"{Seqfile}"
  17. Echo "include ∂"{MPW}Applications:Sequencer∂" ∂'CODE∂' ;">>"{Seqfile}"
  18. Echo "resource 'STR#' (128,∂"MixMake Compile commands∂") ∂{">>"{Seqfile}"
  19. Echo -n "∂{ ">>"{Seqfile}"
  20. #    Application run flags
  21. Set RunMacC 0
  22. Set RunLink 0    # Consulair
  23. Set RunTMLLink 0
  24. #    Make's working directory
  25. Set MakeWD "`Directory`"
  26. Export MakeWD
  27.  
  28. ### Run the Make tool
  29. make {"Parameters"} > MakeOutApps ≥Dev:StdOut
  30.  
  31. ### Construct the input for the Exec application
  32. Execute MakeOutApps
  33. Delete MakeOutApps
  34. If ({RunMacC} == 1)
  35.     Echo "C    {Cfile}    Exec    Done">>"{Efile}"
  36. End
  37. If ({RunLink} == 1)
  38.     Catenate "{Lfile}" >>"{Efile}"
  39.     Delete -i "{Lfile}"
  40. End
  41. If ({RunTMLLink} == 1)
  42.     Catenate "{Tfile}" >>"{Seqfile}"
  43.     Delete -i "{Tfile}"
  44. End
  45. If ({RunMacC} == 1 || {RunLink} == 1)
  46.     Echo "∂"{MakeWD}{Efile}∂";">>"{Seqfile}"
  47.     Echo "∂"{MPW}Applications:Exec∂";">>"{Seqfile}"
  48. End
  49. Open -t "{Seqfile}"
  50. Find ∞ "{Seqfile}"
  51. Clear \;\ "{Seqfile}"
  52. Echo "∂n∂}∂n∂};">>"{Seqfile}"
  53. Close -y "{Seqfile}"
  54. Rez -o "{MPW}Applications:PasRunner" "{Seqfile}"
  55. If {Status} == 0
  56.     Delete -i "{Seqfile}"
  57. End
  58. Unset RunMacC
  59. Unset RunLink
  60. Unset RunTMLLink
  61. Unset Lfile
  62. Unset Cfile
  63. Unset Tfile
  64. Unset MakeWD
  65. Unset Seqfile
  66.  
  67. ### Set up the Resume tasks for after the applications
  68. ### Primarily for error handling
  69. Set PostApp "{MPW}UserResume"
  70. Echo "Unset Efile" >"{MPW}UserResume"
  71. Catenate  "{MPW}MakeSupport:MixMakeResume" >>"{MPW}UserResume"
  72.  
  73. ### If Diagnostic menu item is still around from
  74. ###    an earlier build cycle, delete it.
  75. Set __oldExit {Exit}
  76. Set Exit 0
  77. DeleteMenu File "Open Diagnostics…" ≥Dev:Null
  78. Set Exit {__oldExit}
  79. Unset __oldExit
  80.  
  81. ### Run applications using the custom Sequencer
  82. "{MPW}Applications:PasRunner"
  83.